package com.bwie.home.backstage.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * 
 * 
 * @author sy
 * @email sunlightcs@gmail.com
 * @date 2021-09-10 09:46:41
 */
@Data
@TableName("tb_region")
public class RegionEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 地区ID
	 */
	@TableId
	private Integer regionId;
	/**
	 * 父级id
	 */
	private Integer parentId;
	/**
	 * 地区名称
	 */
	private String regionName;
	/**
	 * 启用状态 1：启用；0：禁用
	 */
	private Integer regionStatus;

	/**
	 * 子级集合
	 */
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	@TableField(exist = false)
	private List<RegionEntity> children;

	/**
	 * 启用城市个数
	 */
	@TableField(exist = false)
	private Integer startCount;

	/**
	 * 禁用城市个数
	 */
	@TableField(exist = false)
	private Integer endCount;

	/**
	 * 包含区、县
	 */
	@TableField(exist = false)
	private String districts;


}
